<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:rich="http://richfaces.org/rich"
	xmlns:p="http://primefaces.org/ui" xmlns:a4j="http://richfaces.org/a4j"
	xmlns:c="http://java.sun.com/jsp/jstl/core">
<h:head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
</h:head>
<h:body>
	<ui:composition template="template.xhtml">

		<ui:define name="title">mehmet emmy</ui:define>
		<ui:define name="body">	


			<h:form id="index">

				<p:dataGrid var="aygitt" value="#{AygitBean.aygitlar}" columns="3"
					rows="12" paginator="true"
					paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
					rowsPerPageTemplate="9,12,15">

					<p:column>
						<p:panel header="#{aygitt.aygit.model}" style="text-align:center">
							<h:panelGrid columns="1" style="width:100%">
								 <p:graphicImage value="../productImages/lcdtvd.jpg" style="height: 150px; width: 130px"/>
								
								<h:outputText value="#{aygitt.sirketprofil.firmaAd}" />

								<p:commandLink update=":index:aygitDetail"
									oncomplete="aygitDialog.show()" title="View Detail">
									<p:graphicImage value="/images/search.png"/>
									<f:setPropertyActionListener value="#{aygitt}"
										target="#{AygitBean.selectedAygitObject}" />
								</p:commandLink>
							</h:panelGrid>
						</p:panel>
					</p:column>

				</p:dataGrid>

				<p:dialog header="Aygıt Detail" widgetVar="aygitDialog"
					modal="true">
					<p:outputPanel id="aygitDetail" style="text-align:center;"
						layout="block">

						<p:graphicImage
							value="../productImages/lcdtvd.jpg" />

						<h:panelGrid columns="2" cellpadding="5">
							<h:outputLabel for="modelNo" value="Model No: " />
							<h:outputText id="modelNo" value="#{AygitBean.selectedAygitObject.aygit.model}" />

							<h:outputLabel for="marka" value="Marka: " />
							<h:outputText id="marka" value="#{AygitBean.selectedAygitObject.aygit.marka}" />
							dialog ta detayları görüntüle
						</h:panelGrid>
					</p:outputPanel>
				</p:dialog>

			</h:form>
		</ui:define>
	</ui:composition>
</h:body>
</html>